<template>
    <div>
        <a-table rowKey="createTime" size="small" :columns="tableColumns" :data-source="list" :pagination="false">
            <template #taskNode="{ record }">
                {{ record.taskNode ? allStepStatus[record.taskNode] : $filters.valToNameFilter('processStatus', record.processStatus) }}
            </template>
        </a-table>
    </div>
</template>

<script lang="ts">
import { allStepStatus } from '@/config/commonData';
import { defineComponent } from 'vue';
export default defineComponent({
    props: {
        list: {
            type: Array,
            default: () => []
        }
    },
    setup() {
        const tableColumns = [
            {
                title: '时间',
                dataIndex: 'createTime',
                width: 180
            },
            {
                title: '操作人',
                width: 120,
                dataIndex: 'empName'
            },
            {
                title: '阶段',
                dataIndex: 'taskNode',
                width: 150,
                slots: { customRender: 'taskNode' }
            },
            {
                title: '变更类型',
                width: 100,
                dataIndex: 'changeType'
            },
            {
                title: '调整原因',
                width: 150,
                dataIndex: 'changeOpinion'
            },
            {
                title: '变更数据',
                dataIndex: 'changeData'
            }
        ];
        return {
            tableColumns,
            allStepStatus
        };
    }
});
</script>

<style scoped>
</style>